package cn.net.lwj.sjqy.control;

import cn.net.lwj.sjqy.entity.JsonResult;
import cn.net.lwj.sjqy.entity.Person;
import cn.net.lwj.sjqy.service.SjqyService;
import cn.net.lwj.sjqy.service.TestService;
import cn.net.lwj.sjqy.service.UserService;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//@Controller
//@RequestMapping("/demo")
@RestController
public class DemoControl {

    @Resource
    private Person person;

    @Resource
    private SjqyService sjqyService;
    @Resource
    private TestService testService;

    @RequestMapping("/index")
    public String index() {
        System.out.println(person.getId() + "___" + person.getName());
        return "index";
    }
    @RequestMapping("/sjqy")
    public JsonResult sjqy() {
        //System.out.println(person.getId() + "___" + person.getName());
        return sjqyService.sjqy();
    }

    @RequestMapping("/test")
    public JsonResult test(){
        return testService.test();
    }

}
